using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetHDHeadImgResponse : GeneratedMessageLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>
		{
			private bool resultIsReadOnly;
			private GetHDHeadImgResponse result;
			protected override GetHDHeadImgResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetHDHeadImgResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetHDHeadImgResponse DefaultInstanceForType
			{
				get
				{
					return GetHDHeadImgResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public uint TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public uint StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public SKBuiltinBuffer_t Data
			{
				get
				{
					return this.result.Data;
				}
				set
				{
					this.SetData(value);
				}
			}
			public Builder()
			{
				this.result = GetHDHeadImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetHDHeadImgResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetHDHeadImgResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetHDHeadImgResponse other = this.result;
					this.result = new GetHDHeadImgResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetHDHeadImgResponse.Builder Clear()
			{
				this.result = GetHDHeadImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetHDHeadImgResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetHDHeadImgResponse.Builder(this.result);
				}
				return new GetHDHeadImgResponse.Builder().MergeFrom(this.result);
			}
			public override GetHDHeadImgResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetHDHeadImgResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetHDHeadImgResponse)
				{
					return this.MergeFrom((GetHDHeadImgResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetHDHeadImgResponse.Builder MergeFrom(GetHDHeadImgResponse other)
			{
				return this;
			}
			public override GetHDHeadImgResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetHDHeadImgResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetHDHeadImgResponse._getHDHeadImgResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetHDHeadImgResponse._getHDHeadImgResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
						if (num3 == 18u)
						{
							this.result.hasUserName = input.ReadString(ref this.result.userName_);
							continue;
						}
					}
					else
					{
						if (num3 == 24u)
						{
							this.result.hasTotalLen = input.ReadUInt32(ref this.result.totalLen_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasStartPos = input.ReadUInt32(ref this.result.startPos_);
							continue;
						}
						if (num3 == 42u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasData)
							{
								builder2.MergeFrom(this.Data);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.Data = builder2.BuildPartial();
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetHDHeadImgResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public GetHDHeadImgResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public GetHDHeadImgResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public GetHDHeadImgResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public GetHDHeadImgResponse.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public GetHDHeadImgResponse.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public GetHDHeadImgResponse.Builder SetTotalLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public GetHDHeadImgResponse.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0u;
				return this;
			}
			public GetHDHeadImgResponse.Builder SetStartPos(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public GetHDHeadImgResponse.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0u;
				return this;
			}
			public GetHDHeadImgResponse.Builder SetData(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasData = true;
				this.result.data_ = value;
				return this;
			}
			public GetHDHeadImgResponse.Builder SetData(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasData = true;
				this.result.data_ = builderForValue.Build();
				return this;
			}
			public GetHDHeadImgResponse.Builder MergeData(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasData && this.result.data_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.data_ = SKBuiltinBuffer_t.CreateBuilder(this.result.data_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.data_ = value;
				}
				this.result.hasData = true;
				return this;
			}
			public GetHDHeadImgResponse.Builder ClearData()
			{
				this.PrepareBuilder();
				this.result.hasData = false;
				this.result.data_ = null;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int UserNameFieldNumber = 2;
		public const int TotalLenFieldNumber = 3;
		public const int StartPosFieldNumber = 4;
		public const int DataFieldNumber = 5;
		private static readonly GetHDHeadImgResponse defaultInstance;
		private static readonly string[] _getHDHeadImgResponseFieldNames;
		private static readonly uint[] _getHDHeadImgResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasUserName;
		private string userName_ = "";
		private bool hasTotalLen;
		private uint totalLen_;
		private bool hasStartPos;
		private uint startPos_;
		private bool hasData;
		private SKBuiltinBuffer_t data_;
		private int memoizedSerializedSize = -1;
		public static GetHDHeadImgResponse DefaultInstance
		{
			get
			{
				return GetHDHeadImgResponse.defaultInstance;
			}
		}
		public override GetHDHeadImgResponse DefaultInstanceForType
		{
			get
			{
				return GetHDHeadImgResponse.DefaultInstance;
			}
		}
		protected override GetHDHeadImgResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public uint TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public uint StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public SKBuiltinBuffer_t Data
		{
			get
			{
				return this.data_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasTotalLen && this.hasStartPos && this.hasData && this.BaseResponse.IsInitialized && this.Data.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.UserName);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.TotalLen);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.StartPos);
				}
				if (this.hasData)
				{
					num += CodedOutputStream.ComputeMessageSize(5, this.Data);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetHDHeadImgResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getHDHeadImgResponseFieldNames = GetHDHeadImgResponse._getHDHeadImgResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, getHDHeadImgResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasUserName)
			{
				output.WriteString(2, getHDHeadImgResponseFieldNames[4], this.UserName);
			}
			if (this.hasTotalLen)
			{
				output.WriteUInt32(3, getHDHeadImgResponseFieldNames[3], this.TotalLen);
			}
			if (this.hasStartPos)
			{
				output.WriteUInt32(4, getHDHeadImgResponseFieldNames[2], this.StartPos);
			}
			if (this.hasData)
			{
				output.WriteMessage(5, getHDHeadImgResponseFieldNames[1], this.Data);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasData)
			{
				num ^= this.data_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			GetHDHeadImgResponse getHDHeadImgResponse = object_0 as GetHDHeadImgResponse;
			return getHDHeadImgResponse != null && (this.hasBaseResponse == getHDHeadImgResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(getHDHeadImgResponse.baseResponse_))) && (this.hasUserName == getHDHeadImgResponse.hasUserName && (!this.hasUserName || this.userName_.Equals(getHDHeadImgResponse.userName_))) && (this.hasTotalLen == getHDHeadImgResponse.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(getHDHeadImgResponse.totalLen_))) && (this.hasStartPos == getHDHeadImgResponse.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(getHDHeadImgResponse.startPos_))) && (this.hasData == getHDHeadImgResponse.hasData && (!this.hasData || this.data_.Equals(getHDHeadImgResponse.data_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<GetHDHeadImgResponse, GetHDHeadImgResponse.Builder>.PrintField("Data", this.hasData, this.data_, writer);
		}
		public static GetHDHeadImgResponse ParseFrom(byte[] data)
		{
			return GetHDHeadImgResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetHDHeadImgResponse MakeReadOnly()
		{
			return this;
		}
		public static GetHDHeadImgResponse.Builder CreateBuilder()
		{
			return new GetHDHeadImgResponse.Builder();
		}
		public override GetHDHeadImgResponse.Builder ToBuilder()
		{
			return GetHDHeadImgResponse.CreateBuilder(this);
		}
		public override GetHDHeadImgResponse.Builder CreateBuilderForType()
		{
			return new GetHDHeadImgResponse.Builder();
		}
		public static GetHDHeadImgResponse.Builder CreateBuilder(GetHDHeadImgResponse prototype)
		{
			return new GetHDHeadImgResponse.Builder(prototype);
		}
		static GetHDHeadImgResponse()
		{
			GetHDHeadImgResponse.defaultInstance = new GetHDHeadImgResponse().MakeReadOnly();
			GetHDHeadImgResponse._getHDHeadImgResponseFieldNames = new string[]
			{
				"BaseResponse",
				"Data",
				"StartPos",
				"TotalLen",
				"UserName"
			};
			GetHDHeadImgResponse._getHDHeadImgResponseFieldTags = new uint[]
			{
				10u,
				42u,
				32u,
				24u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.GetHDHeadImgResponse.Descriptor, null);
		}
	}
}
